.class public Lcom/nemustech/regina/ElementShortcut;
.super Lcom/nemustech/regina/Element;
.source "ElementShortcut.java"


# static fields
.field private static final TAG:Ljava/lang/String; = "ElementShortcut"


# instance fields
.field protected mCustomIcon:Z

.field protected mIcon:Landroid/graphics/drawable/Drawable;

.field protected mIconResource:Landroid/content/Intent$ShortcutIconResource;

.field protected mIntent:Landroid/content/Intent;

.field protected mIsDetachAppList:Z

.field protected mPanel:Lcom/nemustech/tiffany/world/TFPanel;

.field protected mResourceName:Ljava/lang/String;

.field protected mTitle:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .parameter "context"

    .prologue
    .line 31
    invoke-direct {p0}, Lcom/nemustech/regina/Element;-><init>()V

    .line 32
    iput-object p1, p0, Lcom/nemustech/regina/ElementShortcut;->mContext:Landroid/content/Context;

    .line 33
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/nemustech/regina/ElementShortcut;->mIsDetachAppList:Z

    .line 34
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    iput-object v0, p0, Lcom/nemustech/regina/ElementShortcut;->mIntent:Landroid/content/Intent;

    .line 35
    return-void
.end method


# virtual methods
.method public getIcon()Landroid/graphics/drawable/Drawable;
    .locals 1

    .prologue
    .line 50
    iget-object v0, p0, Lcom/nemustech/regina/ElementShortcut;->mIcon:Landroid/graphics/drawable/Drawable;

    return-object v0
.end method

.method public getIconResource()Landroid/content/Intent$ShortcutIconResource;
    .locals 1

    .prologue
    .line 59
    iget-object v0, p0, Lcom/nemustech/regina/ElementShortcut;->mIconResource:Landroid/content/Intent$ShortcutIconResource;

    return-object v0
.end method

.method public getIntent()Landroid/content/Intent;
    .locals 1

    .prologue
    .line 83
    iget-object v0, p0, Lcom/nemustech/regina/ElementShortcut;->mIntent:Landroid/content/Intent;

    return-object v0
.end method

.method public getInternalObject()Lcom/nemustech/tiffany/world/TFObject;
    .locals 1

    .prologue
    .line 92
    iget-object v0, p0, Lcom/nemustech/regina/ElementShortcut;->mPanel:Lcom/nemustech/tiffany/world/TFPanel;

    return-object v0
.end method

.method public getIsCustomIcon()Z
    .locals 1

    .prologue
    .line 46
    iget-boolean v0, p0, Lcom/nemustech/regina/ElementShortcut;->mCustomIcon:Z

    return v0
.end method

.method public getResourceName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 126
    iget-object v0, p0, Lcom/nemustech/regina/ElementShortcut;->mResourceName:Ljava/lang/String;

    return-object v0
.end method

.method public getSnapShot()Landroid/graphics/Bitmap;
    .locals 2

    .prologue
    .line 105
    iget-object v0, p0, Lcom/nemustech/regina/ElementShortcut;->mPanel:Lcom/nemustech/tiffany/world/TFPanel;

    if-eqz v0, :cond_0

    .line 106
    iget-object v0, p0, Lcom/nemustech/regina/ElementShortcut;->mPanel:Lcom/nemustech/tiffany/world/TFPanel;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/nemustech/tiffany/world/TFPanel;->getFaceImage(I)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 107
    :goto_0
    return-object v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public getSnapShot(I)Landroid/graphics/Bitmap;
    .locals 1
    .parameter "faceIndex"

    .prologue
    .line 118
    const/4 v0, 0x0

    return-object v0
.end method

.method public getSnapShotOpposite()Landroid/graphics/Bitmap;
    .locals 1

    .prologue
    .line 112
    const/4 v0, 0x0

    return-object v0
.end method

.method public getTitle()Ljava/lang/String;
    .locals 1

    .prologue
    .line 54
    iget-object v0, p0, Lcom/nemustech/regina/ElementShortcut;->mTitle:Ljava/lang/String;

    return-object v0
.end method

.method public isDetachAppList()Z
    .locals 1

    .prologue
    .line 42
    iget-boolean v0, p0, Lcom/nemustech/regina/ElementShortcut;->mIsDetachAppList:Z

    return v0
.end method

.method public isObjectEventConsumer(Lcom/nemustech/tiffany/world/TFObject;)Z
    .locals 1
    .parameter "object"

    .prologue
    .line 101
    const/4 v0, 0x0

    return v0
.end method

.method public isOwnerOf(Lcom/nemustech/tiffany/world/TFObject;)Z
    .locals 1
    .parameter "object"

    .prologue
    .line 97
    iget-object v0, p0, Lcom/nemustech/regina/ElementShortcut;->mPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {p1, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    return v0
.end method

.method public refreshIcon(Landroid/content/Context;)V
    .locals 6
    .parameter "c"

    .prologue
    const/4 v5, 0x0

    const/4 v4, 0x0

    .line 130
    iget-object v3, p0, Lcom/nemustech/regina/ElementShortcut;->mIntent:Landroid/content/Intent;

    if-eqz v3, :cond_0

    .line 131
    invoke-virtual {p1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v2

    .line 132
    .local v2, packageManager:Landroid/content/pm/PackageManager;
    iget-object v3, p0, Lcom/nemustech/regina/ElementShortcut;->mIntent:Landroid/content/Intent;

    invoke-virtual {v2, v3, v4}, Landroid/content/pm/PackageManager;->resolveActivity(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;

    move-result-object v1

    .line 133
    .local v1, info:Landroid/content/pm/ResolveInfo;
    const/4 v0, 0x0

    .line 134
    .local v0, icon:Landroid/graphics/drawable/Drawable;
    if-eqz v1, :cond_1

    .line 135
    iget-object v3, v1, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;

    invoke-virtual {v3, v2}, Landroid/content/pm/ActivityInfo;->loadIcon(Landroid/content/pm/PackageManager;)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    .line 140
    :goto_0
    invoke-virtual {p0, v0}, Lcom/nemustech/regina/ElementShortcut;->setIcon(Landroid/graphics/drawable/Drawable;)V

    .line 141
    iget-object v3, p0, Lcom/nemustech/regina/ElementShortcut;->mPanel:Lcom/nemustech/tiffany/world/TFPanel;

    if-eqz v3, :cond_0

    iget-object v3, p0, Lcom/nemustech/regina/ElementShortcut;->mPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v3, v4, v5, v5}, Lcom/nemustech/tiffany/world/TFPanel;->setImageResource(ILandroid/graphics/Bitmap;Landroid/graphics/Rect;)Z

    .line 143
    .end local v0           #icon:Landroid/graphics/drawable/Drawable;
    .end local v1           #info:Landroid/content/pm/ResolveInfo;
    .end local v2           #packageManager:Landroid/content/pm/PackageManager;
    :cond_0
    return-void

    .line 138
    .restart local v0       #icon:Landroid/graphics/drawable/Drawable;
    .restart local v1       #info:Landroid/content/pm/ResolveInfo;
    .restart local v2       #packageManager:Landroid/content/pm/PackageManager;
    :cond_1
    invoke-virtual {v2}, Landroid/content/pm/PackageManager;->getDefaultActivityIcon()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    goto :goto_0
.end method

.method public setDetachAppList(Z)V
    .locals 0
    .parameter "detachFromAppList"

    .prologue
    .line 38
    iput-boolean p1, p0, Lcom/nemustech/regina/ElementShortcut;->mIsDetachAppList:Z

    .line 39
    return-void
.end method

.method public setIcon(Landroid/graphics/drawable/Drawable;)V
    .locals 0
    .parameter "icon"

    .prologue
    .line 67
    iput-object p1, p0, Lcom/nemustech/regina/ElementShortcut;->mIcon:Landroid/graphics/drawable/Drawable;

    .line 68
    return-void
.end method

.method public setIconResource(Landroid/content/Intent$ShortcutIconResource;)V
    .locals 0
    .parameter "iconResource"

    .prologue
    .line 75
    iput-object p1, p0, Lcom/nemustech/regina/ElementShortcut;->mIconResource:Landroid/content/Intent$ShortcutIconResource;

    .line 76
    return-void
.end method

.method public setIntent(Landroid/content/Intent;)V
    .locals 1
    .parameter "intent"

    .prologue
    .line 87
    invoke-virtual {p1}, Landroid/content/Intent;->clone()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/content/Intent;

    iput-object v0, p0, Lcom/nemustech/regina/ElementShortcut;->mIntent:Landroid/content/Intent;

    .line 88
    return-void
.end method

.method public setIsCustomIcon(Z)V
    .locals 0
    .parameter "isCustom"

    .prologue
    .line 63
    iput-boolean p1, p0, Lcom/nemustech/regina/ElementShortcut;->mCustomIcon:Z

    .line 64
    return-void
.end method

.method public setPanel(Lcom/nemustech/tiffany/world/TFPanel;)V
    .locals 0
    .parameter "panel"

    .prologue
    .line 79
    iput-object p1, p0, Lcom/nemustech/regina/ElementShortcut;->mPanel:Lcom/nemustech/tiffany/world/TFPanel;

    .line 80
    return-void
.end method

.method public setResourceName(Ljava/lang/String;)V
    .locals 0
    .parameter "resourceName"

    .prologue
    .line 122
    iput-object p1, p0, Lcom/nemustech/regina/ElementShortcut;->mResourceName:Ljava/lang/String;

    .line 123
    return-void
.end method

.method public setTitle(Ljava/lang/String;)V
    .locals 0
    .parameter "iconName"

    .prologue
    .line 71
    iput-object p1, p0, Lcom/nemustech/regina/ElementShortcut;->mTitle:Ljava/lang/String;

    .line 72
    return-void
.end method
